package com.matt.repository.base;

import com.matt.domain.Clientele;
import com.matt.domain.Contract;
import com.matt.foundation.query.ContractQuery;
import com.matt.foundation.vo.ContractVo;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * ********************
 * Created by Ron
 * from com.matt
 * on 2018/6/19 0019.
 * *********************
 */
public interface ContractNativeRepository {
    List<ContractVo> findByConditon(ContractQuery contractQuery);

    Long countContract(ContractQuery contractQuery);

    ContractVo findById(String contractId);

    List<Clientele> findContractBySyschildName(String areaId,String childName);

    List<ContractVo> findByClienteleId(String clienteleId);

    Long findCountByClienteleId(String clienteleId);

    Long findByStatusAndPayStatus(String clienteleId, int status, int payStatus);

    Long signAllContractNum(String staffId, Date begin, Date end);

    Long signFormalContractNum(String staffId, Date begin, Date end);

    Long signEffectiveContractNum(String staffId, Date begin, Date end);

    Long areaContractNum(String areaId, Date begin, Date end);

    Long proceedContractNum(String staffId, Date begin,Date end);

    List<String> findByStaffIdAndStatus(String staffId, int status);
    
    List<ContractVo> checkContractCode(String areaId,String code);
    
    List<ContractVo> findListByClienteleId(String areaId, String clienteleId);

    List<ContractVo> findListByClienteleIdDesc(String areaId, String clienteleId);

    List<Contract> findByClienteleIdList(String areaId, String clienteleId, String beginDate,String endDate);

//    List<Contract> findByAreaIdList(String areaId, String clienteleId,  String beginDate,String endDate);
}
